﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            ArrayList arrayList = new ArrayList() {"miao","gou","ji",6,7 };
            //int index = arrayList.IndexOf("gou");
            //foreach (var ietm in arrayList)
            //{
            //    Console.WriteLine(ietm);
            //}
            //Console.WriteLine(index);

            //ArrayList newlist = new ArrayList();
            //for (int i =0; i<arrayList.Count; i=i+2)
            //{
            //    newlist.Add(arrayList[i]);
            //}
            //foreach (var item in newlist)
            //{
            //    Console.WriteLine(item);
            //}
            //ArrayList charulist = new ArrayList() { "a","b","c"};
            //arrayList.InsertRange(1, charulist);
            //foreach (var i in arrayList)
            //{
            //    Console.WriteLine(i);
            //}
            MyCompareL myCompareL = new MyCompareL();
            arrayList.Sort(myCompareL);
            foreach (var o in arrayList)
            {
                Console.WriteLine(o);
            }
        }
           
    }
}
